<?php
$childmod = get_get("childmod");

if (! $childmod)
    $childmod = "index";
if (! isAjaxRequest()) {
    $data = array();
    $s_uid = getSessionUid();
    if (is_Teacher($s_uid)) {
        $data["isTeacher"] = true;
        $data["subject"] = getTeacherSubject($s_uid, false);
    } else
        $data["isTeacher"] = false;
    $op = get_get("op");
    if ($op) {
        if ($op == "editquestion") {
            $qid = get_get("qid");
            if ($qid) {
                $url = "index.php?mod=question&childmod=personal&ajax=true&op=editquestion&qid=$qid";
                $data["direct"] = true;
                $data["url"] = $url;
                $data["entryid"] = "s_q_p_editor";
                $childmod="personal";
            }
        }
    }
    setSetting("question_bank_data", $data);

    if ($childmod == "index") {
        loadTemp("questionbank/question_bank_index.php");
        die();
    }
    if ($childmod == "personal") {
        loadTemp("questionbank/question_bank_personal.php");
        die();
    }
    if ($childmod == "list") {
        loadTemp("questionbank/question_bank_list.php");
        die();
    }
    printMessage("error", "无效的请求，请联系服务器管理员");
    die();
} else {
    if ($childmod == "index") {
        require_once 'index_handle.php';
    }
    if ($childmod == "personal") {
        require_once 'personal_handle.php';
    }
    if ($childmod == "list") {
        require_once 'list_handle.php';
    }
}

?>